package cn.com.duiba.millionaire.center.biz.remoteservice;

import cn.com.duiba.millionaire.center.api.dto.MillionaireConsumerDto;
import cn.com.duiba.millionaire.center.api.remoteservice.RemoteMillionaireConsumerService;
import cn.com.duiba.millionaire.center.biz.service.MillionaireConsumerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by zzy on 2018/1/18.
 */
@RestController
public class RemoteMillionaireConsumerServiceImpl implements RemoteMillionaireConsumerService {
    @Autowired
    private MillionaireConsumerService millionaireConsumerService;

    @Override
    public MillionaireConsumerDto findByConsumerId(Long consumerId, Long appId) {
        return millionaireConsumerService.findByConsumerId(consumerId, appId, null);
    }

    @Override
    public MillionaireConsumerDto findByConsumerIdNoCache(Long consumerId, Long appId){
        return millionaireConsumerService.findByConsumerIdNoCache(consumerId, appId, null);
    }

    @Override
    public MillionaireConsumerDto findByConsumerIdWithShareCode(Long consumerId, Long appId, String shareCode) {
        return millionaireConsumerService.findByConsumerId(consumerId, appId, shareCode);
    }

    @Override
    public MillionaireConsumerDto findByConsumerIdNoCacheWithShareCode(Long consumerId, Long appId, String shareCode) {
        return millionaireConsumerService.findByConsumerIdNoCache(consumerId, appId, shareCode);
    }
}


